home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / DJDEV203.ZIP / include / signal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-13  |  2.1 KB  |  102 lines

  1. /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
  2. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  3. #ifndef __dj_include_signal_h_
  4. #define __dj_include_signal_h_
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  11.  
  12. #include <sys/djtypes.h>
  13.  
  14. /* 256 software interrupts + 32 exceptions = 288 */
  15.  
  16. #define SIGABRT    288
  17. #define SIGFPE    289
  18. #define SIGILL    290
  19. #define SIGSEGV    291
  20. #define SIGTERM    292
  21. #define SIGINT  295
  22.  
  23. #define SIG_DFL ((void (*)(int))(0))
  24. #define SIG_ERR    ((void (*)(int))(1))
  25. #define SIG_IGN    ((void (*)(int))(-1))
  26.  
  27. __DJ_pid_t
  28. #undef __DJ_pid_t
  29. #define __DJ_pid_t
  30.  
  31. typedef int sig_atomic_t;
  32.  
  33. int    raise(int _sig);
  34. void    (*signal(int _sig, void (*_func)(int)))(int);
  35.   
  36. #ifndef __STRICT_ANSI__
  37.  
  38. #define SA_NOCLDSTOP    1
  39.  
  40. #define SIGALRM    293
  41. #define SIGHUP    294
  42. /* SIGINT is ansi */
  43. #define SIGKILL    296
  44. #define SIGPIPE    297
  45. #define SIGQUIT    298
  46. #define SIGUSR1    299
  47. #define SIGUSR2    300
  48.  
  49. #define SIG_BLOCK    1
  50. #define SIG_SETMASK    2
  51. #define SIG_UNBLOCK    3
  52.  
  53. typedef struct {
  54.   unsigned long __bits[10]; /* max 320 signals */
  55. } sigset_t;
  56.  
  57. struct sigaction {
  58.   int sa_flags;
  59.   void (*sa_handler)(int);
  60.   sigset_t sa_mask;
  61. };
  62.  
  63. int    kill(pid_t _pid, int _sig);
  64. int    sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact);
  65. int    sigaddset(sigset_t *_set, int _signo);
  66. int    sigdelset(sigset_t *_set, int _signo);
  67. int    sigemptyset(sigset_t *_set);
  68. int    sigfillset(sigset_t *_set);
  69. int    sigismember(const sigset_t *_set, int _signo);
  70. int    sigpending(sigset_t *_set);
  71. int    sigprocmask(int _how, const sigset_t *_set, sigset_t *_oset);
  72. int    sigsuspend(const sigset_t *_set);
  73.  
  74. #ifndef _POSIX_SOURCE
  75.  
  76. #define SIGNOFP 301
  77. #define SIGTRAP 302
  78. #define SIGTIMR 303    /* Internal for setitimer (SIGALRM, SIGPROF) */
  79. #define SIGPROF 304
  80. #define SIGMAX 320
  81.  
  82. void    __djgpp_traceback_exit(int _sig);
  83.  
  84. #define NSIG SIGMAX
  85.  
  86. extern char *sys_siglist[];
  87.  
  88. void    psignal(int _sig, const char *_msg);
  89.  
  90. #endif /* !_POSIX_SOURCE */
  91. #endif /* !__STRICT_ANSI__ */
  92. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  93.  
  94. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  95. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  96.  
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100.  
  101. #endif /* !__dj_include_signal_h_ */
  102.